Release 10.1A: OpenEdge Development:
Web Services
ProcObject class factory methods
This the Progress 4GL prototype for the persistent procedure that runs for the sample ProcObject class factory method,
CreatePO_CustomerOrder( ):
Note: The parameter list for the persistent procedure that runs for the ProcObject class factory method is AppServer application dependent, and is the basis for creating the parameter list of the ProcObject class factory method. A persistent procedure can also be specified in ProxyGen to return a string value using the 4GL
RETURNstatement.This is a VB.NET declaration for the ProcObject class factory method,
CreatePO_CustomerOrder( ):
Note: This method maps to a persistent procedure that has been specified to return the string from the 4GL
RETURN-VALUEfunction.The following lines of code:
- Instantiate the ProcObject on the client, enabling access to its methods.
- Call the CreatePO_CustomerOrder( ) method on the AppObject,
webService, to create the ProcObject, CustomerOrder, on the WSA and runCustomerOrder.ppersistently.- Copy the ProcObject ID to the ProcObject from the AppObject (
webService) that creates the ProcObject.
This is a sample RPC/Encoded SOAP request that might be generated from invoking the
CreatePO_CustomerOrder( )method to create the ProcObject, passing in acustNumvalue of 3:
Note the value for the request highlighted in the example, especially the AppObject ID sent for the AppObject,
OrderInfo, which is the parent of the ProcObject being created for customer number 3.This is a sample RPC/Encoded SOAP response that is generated by the WSA from this invocation of the
CreatePO_CustomerOrder( )method:
Note the value returned for the
CustomerOrderProcObject ID highlighted in the example. The Web service returns this ProcObject ID even if it is session free, to allow the ProcObject to access its own AppServer session context.Thus, the SOAP response header returns the following ProcObject ID contained in the
CustomerOrderIDelement:
Finally, note the 4GL
RETURN-VALUE,result, returned from running the persistent procedure, which returns the customer name,"Hoops".
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |